package com.fy.market.strategy.model.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author fwq
 * @desc 规则过滤校验类型值对象
 * @date 2025-09-26
 */
@Getter
@AllArgsConstructor
public enum RuleLogicCheckTypeEnum {

    ALLOW("0000", "放行；执行后续的流程，不受规则引擎影响"),
    TAKE_OVER("1111","接管；后续的流程，受规则引擎执行结果影响"),
    ;

    private final String code;
    private final String info;

    //可以通过code获取枚举
    public static RuleLogicCheckTypeEnum getByCode(String code) {
        for (RuleLogicCheckTypeEnum ruleLogicCheckTypeEnum : RuleLogicCheckTypeEnum.values()) {
            if (ruleLogicCheckTypeEnum.getCode().equals(code)) {
                return ruleLogicCheckTypeEnum;
            }
        }
        return null;
    }

}
